package org.tis.tools.model.log.enums;


import org.tis.tools.model.enums.BaseEnum;

import java.io.Serializable;

/**
 * describe: 操作结果枚举类
 *
 * @author zhaoch
 * @date 2018/8/23
 **/
public enum OperateResult implements BaseEnum {

    /**
     * 成功
     */
    SUCCESS("s", "成功"),
    /**
     * 失败
     */
    FAILURE("f", "失败"),
    /**
     * 错误
     */
    ERROR("e", "错误");

    private final String value;

    private final String desc;

    OperateResult(final String value, final String desc) {
        this.value = value;
        this.desc = desc;
    }


    @Override
    public Serializable getValue() {
        return value;
    }

    public String getDesc() {
        return desc;
    }


    @Override
    public Serializable deserialze() {
        return desc;
    }

    @Override
    public String toString() {
        return desc;
    }
}
